<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>系统后台</title>

    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/Theme2/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme2/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <!-- Morris -->
    <link href="__PUBLIC__/Theme2/css/plugins/morris/morris-0.4.3.min.css" rel="stylesheet">

    <!-- Gritter -->
    <link href="__PUBLIC__/Theme2/js/plugins/gritter/jquery.gritter.css" rel="stylesheet">

    <link href="__PUBLIC__/Theme2/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme2/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme2/css/welcome.min.css?v=4.1.0" rel="stylesheet">

    <style>
        #useCointr{display:none;}
    </style>
</head>

<body class="gray-bg" style="background: #f2f4f8;">
    <div class="wrapper wrapper-content">

        <form method="post" action="__APP__/user/JihuoAction" class="form-horizontal" id="form-admin-add" enctype="multipart/form-data" onsubmit="return ckForm()">
        <table class="table table-striped table-bordered table-hover dataTables-example">


            <tbody>
                <tr class="text-c">
                    <td> 账号：<{$userModel.loginname}></td>
                </tr>
                <tr class="text-c">
                    <td> 推荐人：<{$ruser.loginname}></td>
                </tr>
                <tr class="text-c">
                    <td> 推荐人电话：<{$ruser.tel}></td>
                </tr>
				
                <tr class="text-c">
                    <td> 激活所需费用：<{$userModel.jihuoAmount}></td>
                </tr>
				
                <tr>
                    <td>
                       <a href="__APP__/UserTemp/remit" >填写汇款申请</a>
                    </td>
                </tr>

            </tbody>

        </table>
        </form>


</div>
		
    </div>


    <script src="__PUBLIC__/Theme2/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/Theme2/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/flot/jquery.flot.js"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/flot/jquery.flot.spline.js"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/flot/jquery.flot.resize.js"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/flot/jquery.flot.pie.js"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/flot/jquery.flot.symbol.js"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="__PUBLIC__/Theme2/js/demo/peity-demo.min.js"></script>
    <script src="__PUBLIC__/Theme2/js/content.min.js?v=1.0.0"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/jquery-ui/jquery-ui.min.js"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/easypiechart/jquery.easypiechart.js"></script>
    <script src="__PUBLIC__/Theme2/js/plugins/sparkline/jquery.sparkline.min.js"></script>
    <script src="__PUBLIC__/Theme2/js/demo/sparkline-demo.min.js"></script>

    <script>

        $("#baodan").click(function(){
            var coin = $("#baodancoin").val();
            var jcoin = $("#jihoucoin").val();
            if(coin<=0){
                alert("报单币不足 不能使用报单币激活 ");
                $("#baodan").attr("checked",false);
               // $("#useCointr").css("display","none");
            }
            else{
                $("#useCointr").css("display","table-row");
            }
        })


        $("#userCoin").blur (function(){
            useCoin();
        })


        function useCoin(){

            //  alert($(this).val());
            var jcoin = parseFloat($("#jihoucoin").val());
            var recoin = Math.abs(parseFloat($("#userCoin").val()));

            var coin = parseFloat($("#baodancoin").val());
            if(recoin<=0){
                $("#baodannotice").html("输入无效");
            }

            if(recoin>coin){
                $("#userCoin").val(coin);
                recoin = coin;
            }
            if(recoin>jcoin){
                $("#userCoin").val(jcoin);
                recoin = jcoin;
            }
            var scoin = jcoin-recoin;

            if(scoin>0) {
                $("#baodannotice").html("还需" + scoin + "报单币 或使用在线支付");
            }
            else
                $("#baodannotice").html("");

        }

        function ckForm(){
            useCoin();
        }

    </script>
</body>

</html>
